package Demo1;

/**
 * Created with IntelliJ IDEA.
 * Description:
 * User: homechen
 * Date: 2024-03-23
 * Time: 18:41
 */
public class OuterClass {
    private static int x = 10;
    // 静态内部类
    public static class InnerClass {
        private int y = 5;
        public void innerMethod() {
            System.out.println("外部: " + x);
            System.out.println("内部: " + y);
        }
    }
    public static void main(String[] args) {
        OuterClass.InnerClass innerClass = new InnerClass();
        innerClass.innerMethod();
    }
}
